<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tdl.noise.Noise</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tdl-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="tdl-module.html">Package&nbsp;tdl</a> ::
        <a href="tdl.noise-module.html">Module&nbsp;noise</a> ::
        Class&nbsp;Noise
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="tdl.noise.Noise-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Noise</h1><p class="nomargin-top"><span class="codelink"><a href="tdl.noise-pysrc.html#Noise">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Noise</strong>
</pre>

<hr />
<p>An advanced noise generator.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.noise.Noise-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">algorithm</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">PERLIN</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">FLAT</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">hurst</span>=<span class="summary-sig-default">0.5</span>,
        <span class="summary-sig-arg">lacunarity</span>=<span class="summary-sig-default">2.0</span>,
        <span class="summary-sig-arg">octaves</span>=<span class="summary-sig-default">4.0</span>,
        <span class="summary-sig-arg">seed</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">dimensions</span>=<span class="summary-sig-default">4</span>)</span><br />
      Create a new noise generator specifying a noise algorithm and how 
      it's used.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl.noise-pysrc.html#Noise.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__copy__"></a><span class="summary-sig-name">__copy__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl.noise-pysrc.html#Noise.__copy__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getstate__"></a><span class="summary-sig-name">__getstate__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl.noise-pysrc.html#Noise.__getstate__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__setstate__"></a><span class="summary-sig-name">__setstate__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">state</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl.noise-pysrc.html#Noise.__setstate__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">float</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.noise.Noise-class.html#getPoint" class="summary-sig-name">getPoint</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*position</span>)</span><br />
      Return the noise value of a specific position.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl.noise-pysrc.html#Noise.getPoint">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__del__"></a><span class="summary-sig-name">__del__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl.noise-pysrc.html#Noise.__del__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Properties</span></td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">algorithm</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">PERLIN</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">mode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">FLAT</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">hurst</span>=<span class="sig-default">0.5</span>,
        <span class="sig-arg">lacunarity</span>=<span class="sig-default">2.0</span>,
        <span class="sig-arg">octaves</span>=<span class="sig-default">4.0</span>,
        <span class="sig-arg">seed</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">dimensions</span>=<span class="sig-default">4</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl.noise-pysrc.html#Noise.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Create a new noise generator specifying a noise algorithm and how it's
  used.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>algorithm</code></strong> (string) - The primary noise algorithm to be used.
          <p>Can be one of 'PERLIN', 'SIMPLEX', 'WAVELET'</p>
          <ul>
            <li>
              'PERLIN' - A popular noise generator.
            </li>
            <li>
              'SIMPLEX' - In theory this is a slightly faster generator 
              with less noticeable directional artifacts.
            </li>
            <li>
              'WAVELET' A noise generator designed to reduce aliasing and 
              not lose detail when summed into a fractal (as with the 'FBM'
              and 'TURBULENCE' modes.)
              <p>This works faster at higher dimensions.</p>
            </li>
          </ul></li>
        <li><strong class="pname"><code>mode</code></strong> (string) - A secondary parameter to determine how noise is generated.
          <p>Can be one of 'FLAT', 'FBM', 'TURBULENCE'</p>
          <ul>
            <li>
              'FLAT' - Generates the simplest form of noise. This mode does
              not use the hurst, lacunarity, and octaves parameters.
            </li>
            <li>
              'FBM' - Generates fractal brownian motion.
            </li>
            <li>
              'TURBULENCE' - Generates detailed noise with smoother and 
              more natural transitions.
            </li>
          </ul></li>
        <li><strong class="pname"><code>hurst</code></strong> (float) - The hurst exponent describes the raggedness of the resultant 
          noise, with a higher value leading to a smoother noise. It should
          be in the 0.0-1.0 range.
          <p>This is only used in 'FBM' and 'TURBULENCE' modes.</p></li>
        <li><strong class="pname"><code>lacunarity</code></strong> (float) - A multiplier that determines how quickly the frequency increases 
          for each successive octave.
          <p>The frequency of each successive octave is equal to the 
          product of the previous octave's frequency and the lacunarity 
          value.</p>
          <p>This is only used in 'FBM' and 'TURBULENCE' modes.</p></li>
        <li><strong class="pname"><code>octaves</code></strong> (float) - Controls the amount of detail in the noise.
          <p>This is only used in 'FBM' and 'TURBULENCE' modes.</p></li>
        <li><strong class="pname"><code>seed</code></strong> (object) - You can use any hashable object to be a seed for the noise 
          generator.
          <p>If None is used then a random seed will be generated.</p></li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="getPoint"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getPoint</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*position</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl.noise-pysrc.html#Noise.getPoint">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return the noise value of a specific position.</p>
  <p>Example usage: value = noise.getPoint(x, y, z)</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>position</code></strong> (floats)</li>
    </ul></dd>
    <dt>Returns: float</dt>
        <dd>Returns the noise value at position. This will be a floating 
          point in the 0.0-1.0 range.</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tdl-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Sun Nov 10 19:20:28 2013</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
